//用来调用操作系统上的命令
const spawn = require('cross-spawn');

// const child = spawn('node',['-v'],{stdio:'inherit'});

//同步操作
try{
    const result = spawn.sync('npm',['install','-g','serve'],{stdio: 'inherit'});
    // console.log(result);
    console.log('test')
    // spawn.sync('serve',[''],{stdio:'inherit'})

}catch (e) {
    console.log(e)
}
// console.log('=====result====='+result);
// console.log(result);
// process.exit(1)